const mongoose = require('mongoose');

const studentSchema = new mongoose.Schema({
  studentId: { type: String, required: true, unique: true },
  name: { type: String, required: true },
  gender: { type: String, enum: ['男', '女'], required: true },
  age: { type: Number, required: true },
  class: { type: String, required: true },
  contact: { type: String, required: true },
  totalScore: { type: Number, default: 0 }
});

module.exports = mongoose.model('Student', studentSchema);